package util.citzenid;

public class IDWeightingFactor {

	public static void main(String[] args) {
		for(int i=18;i>0;i--){
			int weight = (int)exponentOf2(i-1)%11;
			System.out.print(weight+",");
		}
		System.out.println();
		
		for(int i=-31;i<=32;i++){
			System.out.println("2^"+i+"="+exponentOf2(i));
		}
	}
	
	private static double exponentOf2(int n){
		int y=1;
		if(n<0){
			n = -n;
			for(int i=0;i<n;i++) y *= 2;
			return (1.0/(double)y);
		}else{
			for(int i=0;i<n;i++) y*=2;
			return y;
		}
	}
}
